package org.jeecg.modules.manage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 中台用户表
 * @Author: yfkj
 * @Date:   2023-02-07
 * @Version: V1.0
 */
@ApiModel(value="caishui_middle_user对象", description="中台用户表")
@Data
@TableName("caishui_middle_user")
public class CaishuiMiddleUser implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;

	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;

	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;

	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;

	/**商户ID*/
    @ApiModelProperty(value = "商户ID")
    private String businessId;

	/**用户ID*/
    @ApiModelProperty(value = "用户ID")
    private String userId;

    /**最后一次登录时间*/
    @Excel(name = "最后一次登录时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后一次登录时间")
    private Date loginTime;

    /**最后一次登录IP*/
    @Excel(name = "最后一次登录IP", width = 15)
    @ApiModelProperty(value = "最后一次登录IP")
    private String loginIp;

    /**登录成功次数*/
    @Excel(name = "登录成功次数", width = 15)
    @ApiModelProperty(value = "登录成功次数")
    private Integer loginNum;

    /**中台用户类型：1-管理者，2-员工*/
    @Excel(name = "中台用户类型", width = 15, dicCode = "caishui_m_user_type")
    @Dict(dicCode = "caishui_m_user_type")
    private Integer middleUserType;



    /**手机号*/
    @Excel(name = "手机号", width = 15)
    @TableField(exist = false)
    private String phone;

    /**姓名*/
    @Excel(name = "姓名", width = 15)
    @TableField(exist = false)
    private String realname;

    /**密码*/
    @TableField(exist = false)
    private String password;

}
